<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2边框与内间距</title>
    <style>
        .d1{
            width: 200px;
            height: 200px;
            background-color: aqua;
            border: red 5px solid;
            border-top: 5px solid yellow;
            border-bottom: 5px solid yellow;
            border-radius: 50px;

        }
        .d2{
            width: 200px;
            height: 200px;
            border: magenta solid 5px;
            padding-left: 50px;
            padding-top: 50px;

            /*切换盒子模型计算方案，默认加内边框会被扩充，现在锁初始值*/
            box-sizing: border-box;
        }
        span{
            border: 3px solid red;
            margin: 50px;
        }
        .s2{
            padding: 50px;
        }
        /*行内元素不论是外间距还是内间距，垂直方向都不生效*/
    </style>
</head>
<body>
<div class="d1"></div>
<div class="d2">内间距测试</div>
<hr>
<span>我是span</span>
<span class="s2" >我是span</span>
<span>我是span</span>
<h1>我是标题</h1>
</body>
</html>